#pragma once

#include <vector>
#include "../Config/DatabaseConfig.h"
#include "../Config/Field.h"
#include "../DataModule/MysqlData.h"
#include "../DataModule/HanaData.h"
#include "EnclaveProvider.h"
#include "Config.h"
#include "ImportDataCache.h"
#include "../Config/TableConfig.h"
#include "Thread.h"

class ImportData;

class ImportDataThread: public Thread
{
public:
    ImportDataThread(ImportData* import_data, DatabaseConfig& hana_config, std::shared_ptr<EnclaveProvider> enclave_provider, Config &config);
    virtual ~ImportDataThread();

    virtual bool runLoop() override;

private:
	Config &config_;

    ImportData* import_data_;

    HanaData hana_data_;

	std::shared_ptr<EnclaveProvider> enclave_provider_;

	IData::Fields field_values;
	IData::Fields encrypt_field_values;
	IData::Fields wirte_field_values;
};

